import Vue from 'vue'
import Router from 'vue-router'

const Home = () => import(/* webpackChunkName: "about" */ '@/views/home/index.vue')
const Goods = () => import(/* webpackChunkName: "about" */ '@/views/home/goods/index.vue')
const ShopTag = () => import(/* webpackChunkName: "about" */ '@/views/shopTag/index.vue')

const Usermy = () => import(/* webpackChunkName: "about" */ '@/views/userMy/index.vue')
const order = () => import(/* webpackChunkName: "about" */ '@/views/userMy/order/index.vue')
const address = () => import(/* webpackChunkName: "about" */ '@/views/userMy/address/index.vue')
const addressnode = () => import(/* webpackChunkName: "about" */ '@/views/userMy/address/address-node/index.vue')
const main = () => import(/* webpackChunkName: "about" */ '@/views/userMy/main/index.vue')

const GoodsClassify = () => import(/* webpackChunkName: "about" */ '@/views/goodsClassify/index.vue')
const Detial = () => import(/* webpackChunkName: "about" */ '@/views/goodsClassify/detial/index.vue')

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/Home',
      component: Home
    },
    {
      path: '/home/goods/:id',
      name: 'goods',
      component: Goods
    },
    {
      path: '/goodsclassify',
      component: GoodsClassify
    },
    {
      path: '/shoptag',
      component: ShopTag
    },
    {
      path: '/usermy',
      component: Usermy
    },
    {
      path: '/usermy/order',
      component: order
    },
    {
      path: '/usermy/address',
      component: address
    },
    {
      path: '/usermy/main',
      component: main
    },
    {
      path: '/goodsclassify/detial',
      component: Detial
    },
    {
      path: '/usermy/address/addressNode',
      component: addressnode
    }
  ]
})
